// 公共接口模块
import request from './request'
import qs from 'qs'

// 获取页面信息
export const getWLProductDetails = (data: object) => {
  return request({
    url: '/api_op/getWLProductDetails',
    method: 'POST',
    data
  })
}

// 获取当前代理人信息
export const getSensorsData = (data: object) => {
  return request({
    url: `/api_op/sensorsData/params/info?${qs.stringify(data)}`,
    method: 'GET'
  })
}

// 保费试算
export const calPremiumEmployer = (data: object) => {
  return request({
    url: '/api_cps/premium/calPremiumEmployer',
    method: 'POST',
    data
  })
}

/** pc **/
// 获得产品信息 状态码等于1043为下架产品
export const querproduct = (params: Record<string, any>) => {
  return request({
    url: '/api_cps/product/queryProduct',
    method: 'GET',
    params
  })
}

// 获得产品披露信息
export const getDisclosureInfoByHdProductCode = (params: Record<string, any>) => {
  return request({
    url: `/api_op/getDisclosureInfoByHdProductCode/${params.productCode}`,
    method: 'GET'
  })
}

// 理赔指引信息查询
export const queryInsuranceCompanyClaimNewShowDtoByProductCode = (params: Record<string, any>) => {
  return request({
    url: `/api_op/company/queryInsuranceCompanyClaimNewShowDtoByProductCode/${params.productCode}`,
    method: 'GET'
  })
}
